<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        img{
            width: 200px;
            height: 200px;
        }
        .on{
            background-color: aquamarine;
        }
    </style>
</head>
<body>

    <div id="app">
        <img 
        v-for="(item,index) in list" 
        v-bind:src="item"
        v-show="activeindex==index">

        <div>
            <span 
            v-for="(item,index) in list"
            @click="activeindex=index"
            v-bind:class="{on:activeindex==index}"
            >{{index+1}}</span>
        </div>

    </div>



    <script src="./vue.js"></script>
    <script>
        const vue=new Vue({
            el:"#app",
            data:{
                activeindex:0,
                list:[
                    "./images/1.jpg",
                    "./images/2.jpg",
                    "./images/3.jpg",
                    "./images/4.jpg",
                ]
            }
        })
    </script>
</body>
</html>